package xyz.chenyongpeng.entity;

import com.baomidou.mybatisplus.annotation.IdType;
import xyz.chenyongpeng.common.BaseEntity;
import com.baomidou.mybatisplus.annotation.TableId;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors;

/**
 * <p>
 * 订单表
 * </p>
 *
 * @author chenyongpeng
 * @since 2018-12-10
 */
@Data
@EqualsAndHashCode(callSuper = true)
@Accessors(chain = true)
@ApiModel(value="ZsOrder对象", description="订单表")
public class ZsOrder extends BaseEntity {

    private static final long serialVersionUID = 1L;

    @ApiModelProperty(value = "订单主键")
    @TableId(value = "o_id", type = IdType.AUTO)
    private Integer oId;

    @ApiModelProperty(value = "用户ID")
    private Integer uId;

    @ApiModelProperty(value = "订单号")
    private String orderSn;

    @ApiModelProperty(value = "订单标题")
    private String orderTitle;

    @ApiModelProperty(value = "订单类型 同商品的类型")
    private Integer orderType;

    @ApiModelProperty(value = "订单的展示图片，默认取第一个产品的图片。")
    private String orderImg;

    @ApiModelProperty(value = "订单创建日期")
    private Integer createTime;

    @ApiModelProperty(value = "联系人姓名")
    private String contactName;

    @ApiModelProperty(value = "联系人电话")
    private String contactTel;

    @ApiModelProperty(value = "联系人身份证号码")
    private String contactIdCard;

    @ApiModelProperty(value = "二维码保存位置")
    private String qrCode;

    @ApiModelProperty(value = "票期开始时间")
    private Integer startTime;

    @ApiModelProperty(value = "票期结束时间")
    private Integer endTime;

    @ApiModelProperty(value = "时段，只有预约的时候才会有。 0: 8:30-10:30， 1: 10:30-12:30， 2: 12:30-14:30， 3: 14:30-16:30， 4: 16:30-17:00")
    private Integer spanTime;

    @ApiModelProperty(value = "总金额")
    private Integer totalAmount;

    @ApiModelProperty(value = "订单原始金额")
    private Integer oriAmount;

    @ApiModelProperty(value = "优惠金额")
    private Integer disAmount;

    @ApiModelProperty(value = "数量，参团人数或门票数量")
    private Integer quantity;

    @ApiModelProperty(value = "是否为预约订单， 1是，0否")
    private Integer isAppointment;

    @ApiModelProperty(value = "是否为拼团订单 1是 0否")
    private Integer isCollage;

    @ApiModelProperty(value = "是否退款 1是 0不是")
    private Integer isRefund;

    @ApiModelProperty(value = "退款原因")
    private String refundReason;

    @ApiModelProperty(value = "退款订单号 TD开头加SN")
    private String refundSn;

    @ApiModelProperty(value = "退款金额 单位分")
    private Integer refundAmount;

    @ApiModelProperty(value = "发起退款申请的时间")
    private Integer refundTime;

    @ApiModelProperty(value = "失败原因")
    private String refundFailReason;

    @ApiModelProperty(value = "订单状态，10下单未支付，20 支付成功未使用，30退款中，31商家处理中，32微信处理中，40退款成功，41退款拒绝，50完成,51逾期自动入园,60拼团中, 70拼团失败, 80拼团成功, 88已过期, 90取消, 99关闭")
    private Integer status;

    @ApiModelProperty(value = "是否被用户删除 1删除 0没删")
    private Integer isDelete;

    @ApiModelProperty(value = "接口返回的订单ID")
    private String transCode;

    @ApiModelProperty(value = "入园取票时间")
    private String playTime;

    @ApiModelProperty(value = "微信是否收款，0没收，1收了")
    private Integer wxPaySucess;

    @ApiModelProperty(value = "退款成功 1 成功，0没成功")
    private Integer wxRefundSuccess;

    @ApiModelProperty(value = "邮政返回的订单状态存储，-1 查无此单，0-未入园；1-身份证入园;2-手机二维码入园;3-窗口取票入园；4-自助取票入园;…;7-过期 自动入园;8-景区取消；9-电商已取消")
    private Integer yzStatus;


}
